import * as echarts from "echarts";
export const barChartInit = (chartDom: HTMLElement) => {
  const myChart: echarts.ECharts = echarts.init(chartDom);
  const option = {
    xAxis: {
      type: "category",
      data: ["北京", "北京市", "江西", "河北", "重庆"],
    },
    yAxis: {
      type: "value",
    },
    series: [
      {
        data: [71, 3, 1, 23, 2],
        type: "bar",
      },
    ],
  };
  if (myChart) {
    myChart.setOption(option);
  }
};
